Accusoft.TwainPro9.ActiveX
Initiate a Scanning Session

Prior to initiating a scanning session, the following should be done:

Once a Scanning session has been initiated (StartSession), capabilities, caption, and layout can be checked, but can no longer be modified.

Using the Data Source UI

To enable the application end user to initiate image acquisition, call the StartSession method. The Data Source User Interface then displays the current or default Data Source User Interface for image acquisition.

VB Example
Copy Code
' This code demonstrates how to display the Data Source UI and then Acquire an image from the Data Source
TwainPRO1.SelectSource
TwainPRO1.StartSession

' After the image is acquired you can place it into the windows
' clipboard then into other applications or controls.

Private Sub TwainPRO1_PostScan()
TwainPRO1.CutToClipboard
Picture1.Picture = Clipboard.GetData(vbCFDIB)
End Sub  

Without Using the Data Source UI

The TwainPRO™ ShowUI property is used to set the Data Source User Interface visibility. To hide the Data Source's User Interface, set ShowUI to false prior to calling the StartSession method.

When acquiring an image without the Data Source User Interface, you must take into account that the default image size and resolution capabilities may create a very large image and your system may not have enough memory for the image transfer. Check the image height, width and resolution settings using GetImageLayout method and capability respectively. If these values are outside of your parameters then you can change them with the SetImageLayout and SetCapOut methods.

Once a Scanning Session has been initiated (StartSession), Data Source capabilities can be checked, but can no longer be modified.
See Also

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback